Skip to content

refactor(python): improve error handling and type safety in streaming…#103

Merged
zTgx merged 1 commit intomainfrom
dev
Apr 21, 2026
Merged

refactor(python): improve error handling and type safety in streaming…#103
zTgx merged 1 commit intomainfrom
dev

Conversation

@zTgx
Copy link
Copy Markdown
Contributor

@zTgx zTgx commented Apr 21, 2026

… module

  • Change return type of event_to_dict from PyObject to PyResult<Bound>
  • Replace unwrap() calls with ? operator for proper error propagation
  • Add explicit type annotation for receiver in anext method
  • Introduce SerializedEvent wrapper struct to handle RetrieveEvent conversion
  • Move Python object conversion to appropriate thread context
  • Reorder imports for better code organization

feat(rust): export SufficiencyLevel and additional types

  • Export SufficiencyLevel enum from retrieval module in Rust library
  • Export ReasoningChain and RetrieveResponse types from retrieval types module
  • Update public API to make these types available to consumers

Summary

Changes

Checklist

  • Code compiles (cargo build)
  • Tests pass (cargo test --lib --all-features)
  • No new clippy warnings (cargo clippy --all-features)
  • Public APIs have documentation comments
  • Python bindings updated (if Rust API changed)

Notes

… module

- Change return type of event_to_dict from PyObject to PyResult<Bound<PyDict>>
- Replace unwrap() calls with ? operator for proper error propagation
- Add explicit type annotation for receiver in __anext__ method
- Introduce SerializedEvent wrapper struct to handle RetrieveEvent conversion
- Move Python object conversion to appropriate thread context
- Reorder imports for better code organization

feat(rust): export SufficiencyLevel and additional types

- Export SufficiencyLevel enum from retrieval module in Rust library
- Export ReasoningChain and RetrieveResponse types from retrieval types module
- Update public API to make these types available to consumers
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vectorless Ready Ready Preview, Comment Apr 21, 2026 4:08pm

@zTgx zTgx merged commit d53c560 into main Apr 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant